<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe测试体验页面无刷新</title>
    <script>
        function go() {
            let value = document.getElementById("url").value;
            document.getElementById("iframe1").src = value;
        }
    </script>
</head>
<body>
<div>
    <p>请输入地址:</p>
    <p>
        <input type="text" id="url" value="http://www.baidu.com/">
        <input type="button" value="提交" onclick="go()">
    </p>

</div>

<div>
    <iframe id="iframe1" style="width: 100%; height: 500px" src="" frameborder="0"></iframe>
</div>
</body>
</html>